<template>
    <div class="body">
      <div class="bottom">
        <div class="left" @click="getGoto(tel)">
          <p style="margin-top:2.4vw;display:block">电话咨询</p>
          <p style="font-size:12px;color:#333333;block">{{tel}}</p>
          <!-- <a :href="'tel:'+tel" id="phone"></a> -->
        </div>
        <div class="right" @click="getGoto('4')">
          <p style="margin-top:2.4vw;display:block">在线客服</p>
          <p style="font-size:12px;color:#333333;display:block">{{time}}</p>
        </div>

        <div class="line"></div>
      </div>
    </div>
</template>

<script>
    export default {
      name: "pageBottom",
      props:["tel","time"],
      methods:{
        getGoto: function (parma) { 
          if(this._globe.isAndroid){
            if(window.android!=null&&typeof(window.android)!="undefined"){
              if(parma.length>10){
                window.android.callAppPhone(parma);
              }else{
                var a=window.android.callAppHelp(parma);
              }
              
              // return num;
            }else{
              if(parma==4){
                document.getElementById('YSF-BTN-HOLDER').onclick();
              }else{
                document.getElementById('tel').onclick();
              }
            }  
          }
          if(this._globe.isIos){
            if(window.webkit){
              window.webkit.messageHandlers.callAppHelp.postMessage(parma)
            }else{
              if(parma==4){
                document.getElementById('YSF-BTN-HOLDER').onclick();
              }else{
                this.$copyText(this.tel).then((e)=>{
                  this.$toast('复制成功')
                }, function (e) {
                  this.$toast('复制失败')
                })
              }
            }
             
          }    
        },
      }
    }
</script>

<style scoped lang="scss">
 /* .body{
    width:100vw;
    height:100vh;

  }*/
.bottom{
  width:100vw;
  height:50px;
  background:#fff;
  text-align:center;
  position:fixed;
  bottom:0px;
  box-shadow:-2px 0px 3px -1px;
}
.left{
  display:inline-block;
  width:50vw;
  float:left;
  p{
    text-align:center;
  }
}
.right{
  display:inline-block;
  width:50vw;
  text-align:center;
  float:left;
}
  .line{
    position:relative;
    height:8vw;
    width:0.2vw;
    border:1px solid #f5f5f5;
    left:49vw;
    top:2.67vw;
  }
</style>
